#include <stdio.h>
#include <errno.h>
#include <string.h>

int main()
{
    FILE *file = fopen("/etc/passwd1","r");
    if(!file)
    {
         printf("errno=%d\n",errno);
	 perror("fopen");
         printf("%m\n");
    }
    
    file = fopen("/etc/passwd1","w");
    if(!file)
    {         
         printf("errno=%d\n",errno);
	 perror("fopen");
         printf("%m\n");
    }
    return 0;
}
